package com.lanou.user;

/**
 * 要求有姓名、年龄、兴趣、班级编号和一个教员类，
 * 
 * @author Lenovo
 *
 */
public class Student {
    String name;
	int age;
	String hobby;
	Clazz clazz;
	Teacher teacher;

	public Student() {

	}

	// 定义一个有参的构造方法
	public Student(String name) {
		this.name = name;
	}

	public Student(String name, int age, String hobby, Clazz clazz, Teacher teacher) {
		this.name = name;
		this.age = age;
		this.hobby = hobby;
		this.clazz = clazz;
		this.teacher = teacher;
	}

	

	@Override
	public String toString() {
		return "Student [name=" + name + ", age=" + age + ", hobby=" + hobby + ", clazz=" + clazz + ", teacher="
				+ teacher + "]";
	}

	public static void main(String[] args) {
		String name = "张三";
		String hobby = "篮球听歌";
		Clazz clazz = new Clazz("20220402", "四年级五班");
		Teacher teacher = new Teacher("高斯林", "java", "计算机", 30);
		Student student = new Student(name,12,hobby,clazz,teacher);
				
		System.out.println(student);
				
	}

}
